Robotics 1.0 Lesson Plan
Lesson 6 - Light up the Day!
1 class (Duration: 1 hour 30 minutes; maximum 4 students per group).
Laptop or desktop with Mu Editor installed.
Circuit Playground Express (CPX) board with USB cable
Relay.
External battery.
Bulb.
Jumper wires.
Know how to open Mu Editor and select CircuitPython mode. Be familiar with writing and saving code.py to CPX
Using relay to set up the circuit
Connection part:
Click here to view the instructions and code
Switching on an externally powered light when darkness is detected.
Here is a document showing code hints (pseudocode):
Click here to view the it.Here is the Solution:
Ask why we need to continuously check the light sensor value.
Discuss why a 9V battery is not sufficient to turn the light on.
Discuss with students why external power is required and why the light cannot be connected directly to the board as done earlier.